home *** CD-ROM | disk | FTP | other *** search
/ SPACE 1 / SPACE - Library 1 - Volume 1.iso / utilitys / 525 / lowswitc / lowswit.lst next >
Encoding:
File List  |  1991-06-17  |  2.8 KB  |  121 lines

  1. DIM palet%(15)
  2. DIM oldcolor%(16)
  3. GOSUB getoldpal
  4. ON ERROR GOSUB dead
  5. a$=" Have fun the easier way with |     LowSwitcher (c) 1991 |"
  6. a$=a$+"       Mike Harrington        |       (704) 786-0622"
  7. ALERT 1,a$,0," OK",a%
  8. ALERT 2," What it about?",2,"YES | NO",a%
  9. IF a%=1 THEN
  10.   GOSUB inst
  11. ENDIF
  12. ctdr%=0
  13. path$=""
  14. frmem=FRE(0)
  15. rez%=XBIOS(4)
  16. IF rez%=0 THEN
  17.   ALERT 3," You are already in | LOW rez.",0,"OK",a%
  18. ELSE
  19.   GOSUB drpath
  20.   orgpath$=path$
  21.   ctfile$=path$+"\*.*"
  22.   filein$=""
  23.   CLS
  24.   LOCATE 22,1
  25.   PRINT "Chose A LOW rez. program to execute"
  26.   DO
  27.     ~FSEL_INPUT(ctfile$,filein$,b)
  28.     IF b=1 THEN
  29.       ALERT 2," Run "+filein$+"| in LOW rez?]",1,"YES | NO",a%
  30.       IF a%=2 THEN
  31.         END
  32.       ELSE
  33.         a%=ASC(ctfile$)-65
  34.         ~GEMDOS(14,a%)
  35.         ctfile$=LEFT$(ctfile$,LEN(ctfile$)-4)
  36.         CHDIR ctfile$
  37.         GOSUB medon
  38.         frmem=FRE(0)
  39.         RESERVE fremem
  40.         a%=EXEC(0,filein$,"","")
  41.         RESERVE
  42.         GOSUB medoff
  43.         GOSUB resetoldpallett
  44.         ~GEMDOS(14,ctdr%)
  45.         ctfile$=path$+"\*.*"
  46.         CHDIR orgpath$
  47.       ENDIF
  48.     ENDIF
  49.     ALERT 2," Chose another program",1,"YES | NO",a%
  50.     IF a%=1 THEN
  51.       filein$=""
  52.       CLS
  53.       LOCATE 22,1
  54.       PRINT "Chose A LOW rez. program to execute"
  55.     ELSE
  56.       END
  57.     ENDIF
  58.   LOOP
  59. ENDIF
  60. END
  61. > PROCEDURE inst
  62.   a$=" LowSwitcher permits you to | execute those troublesome |"
  63.   a$=a$+" LOW rez only programs without | switching the desktop. "
  64.   ALERT 1,a$,0," OK",a%
  65.   a$="  After running a LOW rez. |"
  66.   a$=a$+"  only prog., LowSwitcher  |"
  67.   a$=a$+"  will return control to |"
  68.   a$=a$+"  your med. rez. screen."
  69.   ALERT 1,a$,0," OK",a%
  70.   a$="     MINOR MOUSE PROBLEMS      |"
  71.   a$=a$+" If the mouse is not centered, |"
  72.   a$=a$+"  simply move left or right a |"
  73.   a$=a$+"     full screen width."
  74.   ALERT 1,a$,0," OK",a%
  75.   a$=" Alert boxes also cause minor |"
  76.   a$=a$+"  alignment problems, but as  |"
  77.   a$=a$+"   with the mouse, you can    |"
  78.   a$=a$+"    adjust and overcome."
  79.   ALERT 1,a$,0," OK",a%
  80.   a$="   Many LOW rez. only prgrams |"
  81.   a$=a$+"   function from within this  |"
  82.   a$=a$+" shell with no problems at all."
  83.   ALERT 1,a$,0," OK",a%
  84. RETURN
  85. > PROCEDURE medoff
  86.   ~XBIOS(37)
  87.   ~XBIOS(5,L:-1,L:-1,-1)
  88.   IF rez%>0 THEN
  89.     SPOKE 16745056,1
  90.     ~XBIOS(37)
  91.     ~XBIOS(5,L:-1,L:-1,1)
  92.   ENDIF
  93. RETURN
  94. > PROCEDURE medon
  95.   IF rez%>0 THEN
  96.     SPOKE 16745056,0
  97.     ~XBIOS(37)
  98.     ~XBIOS(5,L:-1,L:-1,0)
  99.   ENDIF
  100. RETURN
  101. > PROCEDURE drpath
  102.   ctdr%=GEMDOS(25)
  103.   path$=DIR$(0)
  104.   path$=CHR$(ctdr%+65)+":"+path$
  105. RETURN
  106. > PROCEDURE dead
  107.   ALERT 1," Sorry, I busted?",0,"OK",a%
  108. RETURN
  109. > PROCEDURE getoldpal
  110.   LOCAL l%
  111.   FOR l%=0 TO 15
  112.     palet%(l%)=XBIOS(7,l%,-1)
  113.   NEXT l%
  114. RETURN
  115. > PROCEDURE resetoldpallett
  116.   LOCAL l%
  117.   FOR l%=0 TO 15
  118.     r%=XBIOS(7,l%,palet%(l%))
  119.   NEXT l%
  120. RETURN
  121.